<%@page import="com.exam.dao.QuestionDbDao"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<jsp:include page="checkAdmin.jsp" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
 <link href="css/style.css" rel="stylesheet" type="text/css" />
 <link href="css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-2.0.js"></script>
<script type="text/javascript" src="js/select-ui.min.js"></script>

<script type="text/javascript">
$(document).ready(function(e){
 
 	 $(".select1").uedSelect({
		width : 345			  
	});
	$(".select2").uedSelect({
		width : 180  
	});
	$(".select3").uedSelect({
		width : 100
	});
 
 
  var url = "#";
  $(".click").click(function(){
  		$(".tip").fadeIn(200);
  		url = this.href;
  		return false;
  });
  
  $(".tiptop a").click(function(){
 		 $(".tip").fadeOut(200);
	});

  $(".sure").click(function(){
  		$(".tip").fadeOut(100);
  		location.href = url;
	});

  $(".cancel").click(function(){
 		$(".tip").fadeOut(100);
	});
	
	
	
});
</script>


</head>
<body>
	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">考试管理</a></li>
    <li><a href="#">试卷列表</a></li>
    </ul>
    </div>
    
    <div class="rightinfo">
    
    <div class="tools">
    
    	<ul class="toolbar">
        <a href="question-save.jsp" title="创建试卷"><li><span><img src="images/t01.png" /></span>创建试卷</li></a>
        </ul>
        
        
        <ul class="toolbar1">
        <li><span><img src="images/t05.png" /></span>设置</li>
        </ul>
    
    </div>
    <form action="paper-list.action">
    <ul class="seachform">
    <li><label>综合查询</label><input name="key" type="text" class="scinput" /></li>
    <li>
	    <label>试卷状态</label>  
	    <div class="vocation">
		    <select name="status" class="select3" >
		    <option value="">全部</option>
		    <option value="1" >考试中</option>
		    <option value="0" >已结束</option>
		    </select>
	    </div>
    </li>
    
    <li><label>&nbsp;</label><input  type="submit" class="scbtn" value="查询"/></li>
    </ul>
    </form>
     <table class="tablelist">
    	<thead>
    	<tr>
        <th>编号<i class="sort"><img src="images/px.gif" /></i></th>
        <th>试卷名称</th>
        <th>试卷描述</th>
        <th>试题数</th>
        <th>开始时间</th>
        <th>考试时间</th>
        <th>试卷总分</th>
        <th>试卷状态</th>
        <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <s:if test="#request.PaperList!=null">
        <s:iterator value="#request.PaperList" status="list">
        <tr>
		        <td><s:property value="id"/></td>
		        <td><s:property value="paperName"/></td>
		        <td><s:property value="summary"/></td>
		        <td><s:property value="questionNum"/>题</td>
		        <td><s:property value="ctime"/></td>
		        <td><s:property value="testTime"/>分钟</td>
		        <td><s:property value="totalScore"/></td>
		        <td>
		         <s:if test="1==status">
		        	<a href="#" title="点击切换状态" class="green">正在考试</a>
		        </s:if>
		        <s:else>
		        	<a href="#" title="点击切换状态" class="red">考试结束</a>
		        </s:else>
		        
		        </td>
		        <td>
		        
		        <s:if test="1==status">
		         <a href="grade-list.action?pid=<s:property value="id"/>" class="tablelink" title="点击查看已考成绩">查看</a>   
		         <a href="paper-testFinished.action?id=<s:property value="id"/>" class="tablelink click">结束考试</a>  
        		 </s:if>
		        <s:else>
		         <a href="grade-list.action?pid=<s:property value="id"/>" class="tablelink" title="点击查看已考成绩">查看</a>   
		         <a href="paper-delete.action?id=<s:property value="id"/>" class="tablelink click">删除试卷</a>  
		        </s:else>
		       
		        </td>
        </tr> 
        </s:iterator>
        </s:if>
        <s:else>
        	<tr>
        		<td colspan="7">暂无本类数据...</td>
        	</tr>
        </s:else>
           
        </tbody>
    </table>
    
    <div class="pagin">
    	<div class="message">
    		${pageInfo }
    	</div>
        ${pageList }
    </div>
    
    
    <div class="tip">
    	<div class="tiptop"><span>提示信息</span><a></a></div>
        
      <div class="tipinfo">
        <span><img src="images/ticon.png" /></span>
        <div class="tipright">
        <p>是否确认对信息的修改 ？</p>
        <cite>如果是请点击确定按钮 ，否则请点取消。</cite>
        </div>
        </div>
        
        <div class="tipbtn">
        <input name="" type="button"  class="sure" value="确定" />&nbsp;
        <input name="" type="button"  class="cancel" value="取消" />
        </div>
    
    </div>
    </div>

</body>
</html>
